package com.sqlist.shareserver.dto;

import java.io.Serializable;

/**
 * Created by SqList on 2018/6/11.
 */

public class MessageDTO<T> implements Serializable {

    private static final long serialVersionUID = -1L;

    private int code;
    private String msg;
    private String type;
    private String username;
    private String token;
    private T data;

    public MessageDTO() {
    }

    public MessageDTO(int code, String msg, String type, String username, String token, T data) {
        this.code = code;
        this.msg = msg;
        this.type = type;
        this.username = username;
        this.token = token;
        this.data = data;
    }

    @Override
    public String toString() {
        return "MessageDTO{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", type='" + type + '\'' +
                ", username='" + username + '\'' +
                ", token='" + token + '\'' +
                ", data=" + data +
                '}';
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
